package com.epoint.xmglspringbootstarterconfiguration;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class XmglSpringBootStarterConfigurationApplication {

	public static void main(String[] args) {
		ConfigurableApplicationContext run = SpringApplication.run(XmglSpringBootStarterConfigurationApplication.class, args);

		XmglService bean = run.getBean(XmglService.class);

		String xmglProjectInfo = bean.getXmglProjectInfo();
		System.out.println(xmglProjectInfo);

		XmglProperties bean1 = run.getBean(XmglProperties.class);
		System.out.println(bean1);

		// 会报错
//		XmglService xmglService = new XmglService();
//		String xmglProjectInfo1 = xmglService.getXmglProjectInfo();
//		System.out.println(xmglProjectInfo1);

	}

}
